Skip to content

Align Compose theming with Figma Design System via unified StreamDesign tokens#6182

Merged
andremion merged 20 commits into
v7from
redesign/AND-1089-introduce-and-apply-streamdesign
Feb 25, 2026
Merged

Align Compose theming with Figma Design System via unified StreamDesign tokens#6182
andremion merged 20 commits into
v7from
redesign/AND-1089-introduce-and-apply-streamdesign

Conversation

@andremion
Copy link
Copy Markdown
Contributor

@andremion andremion commented Feb 23, 2026

Goal

Align the Compose SDK theming with the Figma Chat SDK Design System by introducing a unified StreamDesign namespace for all design tokens (colors, typography, dimensions), removing legacy abstractions that no longer have Figma backing, and eliminating redundant intermediate component themes superseded by ChatComponentFactory.

Implementation

The theming layer was refactored in several incremental phases:

  1. StreamDesign namespace — Consolidated StreamColors, StreamTypography, StreamShapes, and StreamDimens into nested data classes under a single StreamDesign object. Primitive tokens (StreamPrimitiveColors, StreamTokens) remain internal; integrators work exclusively with semantic tokens via StreamDesign.Colors, StreamDesign.Typography, and StreamDesign.Dimens.

  2. Colors alignment — Removed 23 legacy XML-backed color delegates (e.g. textHighEmphasis, barsBackground, primaryAccent) from StreamDesign.Colors, replaced them with ~100 Figma-aligned semantic tokens, and migrated ~280 call sites across all modules. Default factories are now pure Kotlin (no more colorResource() calls).

  3. Typography alignment — Removed 13 legacy typography properties (e.g. title1, body, footnote, singleEmoji) and replaced them with 12 Figma-aligned tokens (e.g. headingLarge, bodyDefault, metadataEmphasis). Special styles (bodyItalic, emojiOnly) are inlined at call sites with TODO markers for future dedicated tokens.

  4. Component theme removal — Deleted 5 intermediate themes (AttachmentPickerTheme, MessageDateSeparatorTheme, MessageUnreadSeparatorTheme, AttachmentsPreviewTheme, AudioRecordingAttachmentPreviewTheme) whose properties were either unused or trivially derivable from StreamDesign tokens. Styling was inlined at call sites.

  5. Shapes removal — Removed StreamDesign.Shapes entirely (no Figma backing, superseded by ChatComponentFactory). Deleted 3 dead properties (myMessageBubble, otherMessageBubble, quotedAttachment), inlined the 8 used shapes at ~35 call sites using StreamTokens radius references.

  6. Typealias removal — Removed all deprecated typealiases (StreamColors, StreamTypography, StreamDimens, StreamShapes) and their deprecated factory shims (defaultColors(), defaultTypography(), defaultDimens()). All code now uses StreamDesign.* types directly.

classDiagram
    class StreamDesign {
        <<object>>
    }
    class Colors {
        <<@Immutable data class>>
    }
    class Typography {
        <<@Immutable data class>>
    }
    class Dimens {
        <<@Immutable data class>>
    }
    class StreamPrimitiveColors {
        <<internal object>>
    }
    class StreamTokens {
        <<internal object>>
    }
    class ChatTheme {
        <<Composable>>
    }

    StreamDesign *-- Colors : nested
    StreamDesign *-- Typography : nested
    StreamDesign *-- Dimens : nested
    Colors ..> StreamPrimitiveColors : references internally
    Colors ..> StreamTokens : references internally
    Typography ..> StreamTokens : references internally
    ChatTheme ..> Colors : provides via CompositionLocal
    ChatTheme ..> Typography : provides via CompositionLocal
    ChatTheme ..> Dimens : provides via CompositionLocal
Loading

Testing

Smoke-test the Compose sample app in both light and dark mode. Walk through the core flows — channel list, message list, message composer, attachment picker, reactions, and polls — and confirm the UI renders correctly with no visual regressions or crashes.

@andremion andremion added the pr:breaking-change Breaking change label Feb 23, 2026
@andremion andremion changed the base branch from develop to v7 February 23, 2026 17:21
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 23, 2026

PR checklist ✅

All required conditions are satisfied:

  • Title length is OK (or ignored by label).
  • At least one pr: label exists.
  • Sections ### Goal, ### Implementation, and ### Testing are filled.

🎉 Great job! This PR is ready for review.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 23, 2026

SDK Size Comparison 📏

SDK Before After Difference Status
stream-chat-android-client 5.25 MB 5.69 MB 0.44 MB 🟡
stream-chat-android-ui-components 10.60 MB 10.96 MB 0.36 MB 🟡
stream-chat-android-compose 12.81 MB 11.89 MB -0.92 MB 🚀

@andremion andremion force-pushed the redesign/AND-1089-introduce-and-apply-streamdesign branch from 03a1679 to 56ba919 Compare February 24, 2026 09:10
@andremion andremion changed the title Introduce StreamDesign and replace the legacy Compose theming Align Compose theming with Figma Design System via unified StreamDesign tokens Feb 24, 2026
@andremion andremion force-pushed the redesign/AND-1089-introduce-and-apply-streamdesign branch from a9ed908 to 6c4a3b9 Compare February 24, 2026 10:15
@andremion andremion marked this pull request as ready for review February 24, 2026 10:15
@andremion andremion requested a review from a team as a code owner February 24, 2026 10:15
@andremion andremion force-pushed the redesign/AND-1089-introduce-and-apply-streamdesign branch from 270c755 to 5913230 Compare February 24, 2026 16:01
@andremion andremion enabled auto-merge (squash) February 24, 2026 17:13
@sonarqubecloud
Copy link
Copy Markdown

@andremion andremion merged commit 7659b56 into v7 Feb 25, 2026
19 of 20 checks passed
@andremion andremion deleted the redesign/AND-1089-introduce-and-apply-streamdesign branch February 25, 2026 09:38
@stream-public-bot stream-public-bot added the released Included in a release label Mar 23, 2026
@stream-public-bot
Copy link
Copy Markdown
Contributor

🚀 Available in v7.0.0-beta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:breaking-change Breaking change released Included in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants